<template>
    <div style="display: flex; align-items: center;">
        <el-input placeholder="请输入打卡地点" style="width: 200px;" :id="inputObj.searchId" v-model="inputObj.keyword"></el-input>
        <el-button type="primary" icon="el-icon-search" style="margin-left: 10px;" @click="send">搜索</el-button>
    </div>
</template>

<script>
import eventBus from '@/eventBus/eventBus' 
export default {
    data(){
        return{
            inputObj:{
                searchId:'searchKeyword',
                keyword:''
            }
        }
    },
    methods:{
        send(){
            eventBus.$emit('search',this.inputObj)
        }
    },
    mounted(){
        this.send(); 
    }
}
</script>

<style lang="less" scoped>

</style>